function strhash(str){
    var hash = 1315423911, i,ch;
    for (i = str.length - 1; i >= 0; i--) {
        ch = str.charCodeAt(i);
        hash ^= ((hash << 5) + ch + (hash >> 2));
    }
    hash ^= ((hash << 5) + ch + (hash >> 2));
    return hash;
}